﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TT.HelpInfo;
using Bill.BasDLL.dao;
using Bill.BasDLL.ety;
using System.Data;

namespace Bill.BasDLL
{
    public class bizChrgFavour : basClassDeclare
    {        
        daoChrgFavour doChrgFavour;

        public bizChrgFavour(TT.Module.sysLogin.etyBaeSystemParamter basSysPara)
        {
            doChrgFavour = new daoChrgFavour(basSysPara);
        }

        public bool Insert(etyChrgFavour eyTrk)
        {
            return doChrgFavour.Insert(eyTrk);
        }

        public bool Update(etyChrgFavour eyTrk)
        {
            return doChrgFavour.Update(eyTrk);
        }

        public bool Delete(etyChrgFavour eyTrk)
        {
            return doChrgFavour.Delete(eyTrk);
        }

        public IList<etyChrgFavour> GetChrgFavour()
        {
            DataTable dt = doChrgFavour.GetChrgFavour();
            IList<etyChrgFavour> ilRusult = TT.Common.Converts.ConvertToIList<etyChrgFavour>(dt);
            return ilRusult;
        }
        public IList<etyClient> GetClient()
        {
            DataTable dt = doChrgFavour.GetClient();
            IList<etyClient> ilRusult = TT.Common.Converts.ConvertToIList<etyClient>(dt);
            return ilRusult;
        }

        public IList<etyBillCode> GetBillCode()
        {
            DataTable dt = doChrgFavour.GetBillCode();
            IList<etyBillCode> ilRusult = TT.Common.Converts.ConvertToIList<etyBillCode>(dt);
            return ilRusult;
        }

        public IList<etyFavourPrice> GetFavPrice(string favId)
        {
            DataTable dt = doChrgFavour.GetFavPrice(favId);
            IList<etyFavourPrice> ilRusult = TT.Common.Converts.ConvertToIList<etyFavourPrice>(dt);
            return ilRusult;
        }
        public bool AddFavPrice(etyFavourPrice eyFavPic)
        {
            return doChrgFavour.AddFavPrice(eyFavPic);
        }
        public bool DelFavPrice(etyFavourPrice eyFavPic)
        {
            return doChrgFavour.DelFavPrice(eyFavPic);
        }
        public IList<etyArea> GetArea(string clientId, string bussType)
        {
            DataTable dt = doChrgFavour.GetArea(clientId, bussType);
            IList<etyArea> ilRusult = TT.Common.Converts.ConvertToIList<etyArea>(dt);
            return ilRusult;
        }
    }
}
